package com.itheima.util;


import java.util.Random;

/**
 * @author zqystart
 * @create 2022-09-01-14:38
 */
//生成唯一的订单号
public class StringUtil {

    public static String produce(){//生成唯一的订单号
        StringBuffer sb = new StringBuffer();
        sb.append(System.currentTimeMillis());
        String s = String.valueOf(Math.abs(new Random().nextInt()));
        sb.append(s);
        String orderId=String.valueOf(sb);
        return orderId;
    }

}
